package e3dds

import (
	"reflect"
	"runtime"
	"strings"
)

func getFunctionName(val reflect.Value) string {
	fn := runtime.FuncForPC(val.Pointer()).Name()
	lastPos := strings.LastIndexByte(fn, '.')
	if lastPos == -1 {
		return fn
	}
	return fn[lastPos+1:]
}
